-- GENERATED SPELL FOR [Sunfury Bowman] --


function spell0_20207(pUnit, Event) --@Immolation Arrow,n/a--
pUnit:FullCastSpellOnTarget(37847,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_20207', 1000, 1)
end

function spell1_20207(pUnit, Event) --@Net,n/a--
pUnit:FullCastSpellOnTarget(12024,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_20207', 5289, 1)
end

function spell2_20207(pUnit, Event) --@Shoot,n/a--
pUnit:FullCastSpellOnTarget(6660,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_20207', 556, 1)
end

function Sorts_20207(pUnit, Event)
local choix_sorts_20207 = math.random(0, 2)
if choix_sorts_20207 == 0 then
pUnit:RegisterEvent('spell0_20207', 1, 1)
end
if choix_sorts_20207 == 1 then
pUnit:RegisterEvent('spell1_20207', 1, 1)
end
if choix_sorts_20207 == 2 then
pUnit:RegisterEvent('spell2_20207', 1, 1)
end
end

function mob20207_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_20207', math.random(1500, 3000), 1)
end

function mob20207_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob20207_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob20207_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(20207, 1, 'mob20207_Action')
RegisterUnitEvent(20207, 2, 'mob20207_Leave')
RegisterUnitEvent(20207, 3, 'mob20207_Kill')
RegisterUnitEvent(20207, 4, 'mob20207_Die')
